package com.ourway.entity.feishu.card;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class FeiShuCard {


    private ConfigBean config;
    private HeaderBean header;
    private List<ElementsBean> elements;

    @NoArgsConstructor
    @Data
    public static class ConfigBean {

        private boolean wide_screen_mode;
    }

    @NoArgsConstructor
    @Data
    public static class HeaderBean {

        private TitleBean title;

        @NoArgsConstructor
        @Data
        public static class TitleBean {

            private String tag;
            private String content;
        }
    }

    @NoArgsConstructor
    @Data
    public static class ElementsBean {

        private String tag;
        private String layout;
        private List<FieldsBean> fields;
        private List<ActionsBean> actions;

        @NoArgsConstructor
        @Data
        public static class FieldsBean {


            private boolean is_short;
            private TextBean text;

            @NoArgsConstructor
            @Data
            public static class TextBean {
                /**
                 * tag : lark_md
                 * content : **申请人**
                 王晓磊
                 */

                private String tag;
                private String content;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ActionsBean {

            private String tag;
            private TextBeanX text;
            private String type;
            private ValueBean value;

            @NoArgsConstructor
            @Data
            public static class TextBeanX {

                private String tag;
                private String content;
            }

            @NoArgsConstructor
            @Data
            public static class ValueBean {

                private String chosen;

                private String instanceCode;
            }
        }
    }
}
